<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--1.内联方式 添加一个按钮 -->
    <input type="button" value="提交" onclick="console.log('今天的天气很好！')">
    <hr>
    <input type="button" value="提交2" id="btn">
    <!-- 2.内嵌方式 -->
    <script>
        document.getElementById("btn").onclick=function(){
            console.log('明天又是一个大晴天！')
        }
    </script>
    <hr>
    <!-- 3.外链方式 -->
    <input type="button" value="提交3" id="btn2">
    <script src="js/js1.js"></script>
</body>
</html>